<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>便民购 || 农产品智能交易平台</title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link rel="shortcut icon" href="/image/icon/litIcon.ico">
    <link href="/css/reset.css" rel="stylesheet" type="text/css"/>
    <link href="/css/page.css" rel="stylesheet" type="text/css"/>
    <link href="/css/detailPage.css" rel="stylesheet" type="text/css"/>
    <script src="/js/jquey-1.8.0.min.js"></script>
</head>

<body>
<!-- 顶部导航 -->
<div th:replace="commonFragment :: #top"></div>
<!-- /顶部导航 -->

<!-- logo与search区域 -->
<div th:replace="commonFragment :: #logo_line"></div>
<!-- /logo与search区域 -->

<!-- 导航条 -->
<div th:replace="commonFragment :: #navbar"></div>
<!-- /导航条 -->

<!-- 商品内容列表区域上部 -->
<div id="content" class="wrap clear">
    <!-- 列表级别 -->
    <div class="userPosition wrap clear">
        <a href="">首页</a>
        <span>&nbsp;&gt;&nbsp;</span>
        <a href="">时蔬</a>
        <span>&nbsp;&gt;&nbsp;</span>
        <a href="">热销蔬菜</a>
        <span>&nbsp;&gt;&nbsp;</span>
        <a href="">促销商品</a>
        <span>&nbsp;</span></div>
    <!-- /列表级别 -->

    <div class="description clear">
        <div class="dleftArea fl">
            <div class="topItem">
                <a href="">
                    <img src="/image/book/book_list4/list4_big1.jpg" alt="" height="400" width="400">
                </a>
            </div>
            <ul class="thumb">
                <li class="tfirst">
                    <a href=""><img src="/image/book/book_list4/list4_lit1.jpg" height="50" width="50" alt=""></a>
                </li>
                <li>
                    <a href=""><img src="/image/book/book_list4/list4_lit2.jpg" alt=""></a>
                </li>
                <li>
                    <a href=""><img src="/image/book/book_list4/list4_lit3.jpg" alt=""></a>
                </li>
                <li>
                    <a href=""><img src="/image/book/book_list4/list4_lit4.jpg" alt=""></a>
                </li>
                <li></li>
                <li></li>
                <li class="tlast"></li>
            </ul>
            <div class="social">
                <ul class="clear">
                    <li><a href="">收藏商品</a></li>
                    <li><a href="">加入对比</a></li>
                    <li class="attention"><b></b><a href="">关注商品</a></li>
                    <li class="share"><b></b><a href="">分享</a></li>
                </ul>
            </div>
        </div>
        <div class="drightArea fl clear">
            <div class="itemInfo fl clear">
                <!-- name and description -->
                <div id="name">
                    <h1>[[${commodity.commodityName}]] [[${commodity.description}]]</h1>
                    <div id="p-ad" class="p-ad J-ad-1279804">降11元，仅售48元，现货速抢，手慢后悔！</div>
                    <div id="p-ad-phone" class="p-ad">送鸡蛋一个</div>
                </div>
                <!-- /name and description -->

                <!-- 对比(无用) -->
                <div id="compare">
                    <a href="#none" id="comp_1279804" data-sku="1279804"
                       class="J_contrast btn-compare selected btn-compare-s-active"
                       clstag="shangpin|keycount|product|jiaruduibi">
                        <span>对比</span>
                    </a>
                </div>
                <!-- /对比(无用) -->

                <!-- price -->
                <div id="summary">
                    <div id="comment-count" clstag="shangpin|keycount|product|1|pingjiabtn">
                        <p class="comment">累计评价</p>
                        <a class="count J-comm-1279804" href="#comment">11327</a>
                    </div>

                    <!-- 价格 -->
                    <div id="summary-price">
                        <div class="dt">时 代 价：</div>
                        <div class="dd">
<!--                            ￥<strong class="p-price" id="jd-price">48.00</strong>-->
                            ￥<strong class="p-price" id="jd-price" >[[${commodity.curSale}]]</strong>
                            <a data-type="1" data-sku="1279804" id="notice-downp" class="J-notify-1" href="#none"
                               clstag="shangpin|keycount|product|1|jiangjia">(降价通知)</a>
                        </div>
                    </div>
                    <!-- /价格 -->

                    <!-- 促销 -->
                    <div id="J-summary-top" class="summary-top">
                        <div id="summary-promotion" class="hide" style="display: block;">
                            <div class="dt">促销信息：</div>
                            <div class="dd J-prom-wrap p-promotions-wrap" style="padding-bottom: 5px;">
                                <div class="p-promotions">
                                    <div class="J-prom-bvalue">
                                        <a class="hl_red_bg">满299 </a>
                                        <a class="hl_red"> 赠送一斤榴莲</a>
                                        <a href="" target="_blank">&nbsp;&nbsp;详情 &gt;&gt;</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- /促销 -->

                    <!-- 配送地址 -->
                    <div id="summary-stock" class="clear">
                        <div class="dt">配 送 至：</div>
                        <div class="dd clearfix">
                            <div id="store-selector" class="hover">
                                <select name="address" id="address_info" class="text">
                                    <option value="北京朝阳区三环以内">北京朝阳区三环以内</option>
                                    <option value="广西南宁市区游乐园">广西南宁市区游乐园</option>
                                </select>
                                <!--<div class="text">
                                    <div title="北京朝阳区三环以内">北京朝阳区三环以内</div>
                                    <b></b>
                                </div>-->
                                <!-- 详细地址 -->
                                <!--<div class="content">
                                    <div data-widget="tabs" class="m JD-stock" id="JD-stock">
                                        <div class="mt">
                                            <ul class="tab">
                                                <li data-index="0" data-widget="tab-item" class=""><a href="#none"
                                                                                                      class=""><em>北京</em><i></i></a>
                                                </li>
                                                <li data-index="1" data-widget="tab-item" style="" class=""><a
                                                        href="#none" class="" title="朝阳区"><em>朝阳区</em><i></i></a></li>
                                                <li data-index="2" data-widget="tab-item" style="display: list-item;"
                                                    class="curr"><a href="#none" class="hover"
                                                                    title="三环以内"><em>三环以内</em><i></i></a></li>
                                                <li data-index="3" data-widget="tab-item" style="display: none;"><a
                                                        href="#none" class=""><em>请选择</em><i></i></a></li>
                                            </ul>
                                            <div class="stock-line"></div>
                                        </div>
                                        <div class="mc" data-area="0" data-widget="tab-content" id="stock_province_item"
                                             style="display: none;">
                                            <ul class="area-list">
                                                <li><a href="#none" data-value="1">北京</a></li>
                                                <li><a href="#none" data-value="2">上海</a></li>
                                                <li><a href="#none" data-value="3">天津</a></li>
                                                <li><a href="#none" data-value="4">重庆</a></li>
                                                <li><a href="#none" data-value="5">河北</a></li>
                                                <li><a href="#none" data-value="6">山西</a></li>
                                                <li><a href="#none" data-value="7">河南</a></li>
                                                <li><a href="#none" data-value="8">辽宁</a></li>
                                                <li><a href="#none" data-value="9">吉林</a></li>
                                                <li><a href="#none" data-value="10">黑龙江</a></li>
                                                <li><a href="#none" data-value="11">内蒙古</a></li>
                                                <li><a href="#none" data-value="12">江苏</a></li>
                                                <li><a href="#none" data-value="13">山东</a></li>
                                                <li><a href="#none" data-value="14">安徽</a></li>
                                                <li><a href="#none" data-value="15">浙江</a></li>
                                                <li><a href="#none" data-value="16">福建</a></li>
                                                <li><a href="#none" data-value="17">湖北</a></li>
                                                <li><a href="#none" data-value="18">湖南</a></li>
                                                <li><a href="#none" data-value="19">广东</a></li>
                                                <li><a href="#none" data-value="20">广西</a></li>
                                                <li><a href="#none" data-value="21">江西</a></li>
                                                <li><a href="#none" data-value="22">四川</a></li>
                                                <li><a href="#none" data-value="23">海南</a></li>
                                                <li><a href="#none" data-value="24">贵州</a></li>
                                                <li><a href="#none" data-value="25">云南</a></li>
                                                <li><a href="#none" data-value="26">西藏</a></li>
                                                <li><a href="#none" data-value="27">陕西</a></li>
                                                <li><a href="#none" data-value="28">甘肃</a></li>
                                                <li><a href="#none" data-value="29">青海</a></li>
                                                <li><a href="#none" data-value="30">宁夏</a></li>
                                                <li><a href="#none" data-value="31">新疆</a></li>
                                                <li><a href="#none" data-value="32">台湾</a></li>
                                                <li><a href="#none" data-value="42">香港</a></li>
                                                <li><a href="#none" data-value="43">澳门</a></li>
                                                <li><a href="#none" data-value="84">钓鱼岛</a></li>
                                            </ul>
                                        </div>
                                        <div class="mc" data-area="1" data-widget="tab-content" id="stock_city_item"
                                             style="display: none;">
                                            <ul class="area-list">
                                                <li><a href="#none" data-value="72">朝阳区</a></li>
                                                <li><a href="#none" data-value="2800">海淀区</a></li>
                                                <li><a href="#none" data-value="2801">西城区</a></li>
                                                <li><a href="#none" data-value="2802">东城区</a></li>
                                                <li><a href="#none" data-value="2803">崇文区</a></li>
                                                <li><a href="#none" data-value="2804">宣武区</a></li>
                                                <li><a href="#none" data-value="2805">丰台区</a></li>
                                                <li><a href="#none" data-value="2806">石景山区</a></li>
                                                <li><a href="#none" data-value="2807">门头沟</a></li>
                                                <li><a href="#none" data-value="2808">房山区</a></li>
                                                <li><a href="#none" data-value="2809">通州区</a></li>
                                                <li><a href="#none" data-value="2810">大兴区</a></li>
                                                <li><a href="#none" data-value="2812">顺义区</a></li>
                                                <li><a href="#none" data-value="2814">怀柔区</a></li>
                                                <li><a href="#none" data-value="2816">密云区</a></li>
                                                <li><a href="#none" data-value="2901">昌平区</a></li>
                                                <li><a href="#none" data-value="2953">平谷区</a></li>
                                                <li><a href="#none" data-value="3065">延庆县</a></li>
                                            </ul>
                                        </div>
                                        <div class="mc" data-area="2" data-widget="tab-content" id="stock_area_item"
                                             style="display: block;">
                                            <ul class="area-list">
                                                <li><a href="#none" data-value="2799">三环以内</a></li>
                                                <li><a href="#none" data-value="4137">管庄</a></li>
                                                <li><a href="#none" data-value="4139">北苑</a></li>
                                                <li><a href="#none" data-value="4211">定福庄</a></li>
                                                <li class="long-area"><a href="#none" data-value="2819">三环到四环之间</a></li>
                                                <li class="long-area"><a href="#none" data-value="2839">四环到五环之间</a></li>
                                                <li class="long-area"><a href="#none" data-value="2840">五环到六环之间</a></li>
                                            </ul>
                                        </div>
                                        <div class="mc" data-area="3" data-widget="tab-content" id="stock_town_item"
                                             style="display: none;"></div>
                                    </div>
                                    <span class="clr"></span>
                                </div>
                                <div class="close" onclick="$('#store-selector').removeClass('hover')"></div>-->
                                <!-- /详细地址 -->
                            </div>
                            <div id="store-prompt">
                                <b>有货</b>，支持&nbsp;
                                <a href="http://help.jd.com/user/issue/103-983.html" target="_blank"
                                   title="钻石会员自营订单满59元（含）免运费， 其他会员自营订单满79元（含）免运费， 不足金额订单收取5元/单运费（偏远地区额外收取10元/件）。">79免运费</a>
                                &nbsp;&nbsp;|&nbsp;&nbsp;
                                <a href="http://help.jd.com/user/issue/103-983.html" target="_blank"
                                   title="支持送货上门后再收款，支持现金、POS机刷卡等方式">货到付款</a>
                                <span class="charges"></span>
                            </div>
                        </div>
                        <span class="clr"></span>
                    </div>
                    <!-- /配送地址 -->

                    <!-- 服务 -->
                    <div id="summary-service" clstag="shangpin|keycount|product|1|fuwu">
                        <div class="dt">服　　务：</div>
                        <div class="dd"><span class="deliver">由 便民购 发货,</span>
                            <a href="" clstag="shangpin|keycount|product|bbtn" class="hl_red">大润发</a>
                            提供售后服务。15:00前完成下单,可预约今晚送达
                        </div>
                    </div>
                    <!-- 服务 -->
                </div>
                <!-- /price -->

                <!-- 规格 -->
                <!--<div id="summary-service" clstag="shangpin|keycount|product|1|fuwu">
                    <div class="dt">规　　格：</div>
                    <div class="dd">
                        <a href="" class="standard">1斤</a>
                        <a href="" class="standard">3斤</a>
                        <a href="" class="standard">5斤</a>
                        <a href="" class="standard">10斤</a>
                        <a href="" class="standard">30斤</a>
                        <a href="" class="standard">7斤（促销）</a>
                    </div>
                </div>-->
                <!-- /规格 -->

                <!-- 包装 -->
                <!--<div id="summary-packing" clstag="shangpin|keycount|product|1|fuwu">
                    <div class="dt">包　　装：</div>
                    <div class="dd">
                        <a href="" class="standard">平安夜限定礼盒</a>
                        <a href="" class="standard">普通</a>
                        <a href="" class="standard">加固包装</a>
                        <a href="" class="standard">赠品</a>
                    </div>
                </div>-->
                <!-- /包装 -->

                <!-- 购买数量 -->
                <dl class="amount dl clear">
                    <dt class="property-type">数&nbsp;&nbsp;量：</dt>
                    <dd>
                        <span class="stock" id="J_Stock">
                            <!-- class="disable-reduce" -->
                            <a href="" id="count_decrease" class="disable-reduce">-</a>
                            <input id="J_IptAmount" type="text"
                                   class="tb-text" value="1" maxlength="8" title="请输入购买量">
                            <a href="" id="count_increase">+</a>&nbsp;&nbsp;&nbsp;  件
                        </span>
                        <em>(库存<span id="J_SpanStock" class="count">[[${commodity.repertory}]]</span>件)</em>
                    </dd>
                </dl>
                <script type="text/javascript">
                    $(function () {
                        $("#count_decrease").click(function (event) {
                            event.preventDefault();
                            $("#count_increase").removeClass('disable-reduce');
                            let count = parseInt($("#J_IptAmount").val()) - 1;
                            $("#J_IptAmount").val(count);
                            if(count === 1) {
                                $(this).addClass('disable-reduce')
                            }
                        });
                        $("#count_increase").click(function (event) {
                            event.preventDefault();
                            $("#count_decrease").removeClass('disable-reduce');
                            let count = parseInt($("#J_IptAmount").val()) + 1;
                            let repertory = parseInt($("#J_SpanStock").text());
                            $("#J_IptAmount").val(count);
                            if(count == repertory) {
                                $(this).addClass('disable-reduce')
                            }
                        });
                    })
                </script>
                <!-- /购买数量 -->

                <!-- 立即购买，放入购物车 -->
                <div id="J_juValid" class="action clear">
                    <!-- 立即购买 -->
                    <div class="btn-buy fl" id="in_order">
                        <a href="javascript:void(0)" title="点击此按钮，到下一步确认购买信息" >立即购买</a>
                    </div>
                    <!-- 放入购物车 -->
                    <div class="btn-add fl" id="in_cart">
                        <a href="javascript:void(0)" title="加入购物车" >加入购物车</a>
                    </div>
                </div>
                <form th:action="@{/agricultural/goLookOrderForm}" id="sub_shopping_cart" style="display: none">
                    <input type="hidden" name="uid" th:value="${session.user.id}">
                    <input type="hidden" name="comId" th:value="${commodity.id}">
                    <input type="hidden" name="prodName" th:value="${commodity.commodityName}">
                    <input type="hidden" name="unitPrice" th:value="${commodity.curSale}">
                    <input type="hidden" name="prodCnt" value="1">
                    <input type="hidden" name="totalPrice" value="1">
                </form>
                <script type="text/javascript">
                    $(function () {
                        // 加入购物车
                        $("#in_cart").click(function () {
                            let prod_cnt = $("#J_IptAmount").val();
                            $("input[name='prodCnt']").val(prod_cnt);
                            let unit_price = $("input[name='unitPrice']").val();
                            let total_price = parseInt(prod_cnt) * parseFloat(unit_price);
                            $("input[name='totalPrice']").val(total_price);
                            let data = $("#sub_shopping_cart").serialize();
                            $.ajax({
                                url:"/agricultural/inCartInfo",
                                type: "POST",
                                data,
                                success(reData){
                                    alert(reData.message)
                                }
                            })
                        });
                        // 去订单页
                        $("#in_order").click(function () {
                            let prod_cnt = $("#J_IptAmount").val();
                            $("input[name='prodCnt']").val(prod_cnt);
                            let unit_price = $("input[name='unitPrice']").val();
                            let total_price = parseInt(prod_cnt) * parseFloat(unit_price);
                            $("input[name='totalPrice']").val(total_price);
                            $("#sub_shopping_cart").submit();
                        })
                    })
                </script>
                <!-- /立即购买，放入购物车 -->

                <!-- 保障： 支付方式   正品保障 假一赔三 -->
                <div class="dl">
                    <dl class="mod_detailInfor_ensure clear">
                        <dt class="dt">保障：</dt>
                        <dd class="dd clear">
                            <div class="payment" id="payment">
                                <a href="javascript:void(0);" class="paybtn">支付方式
                                    <span class="iconDetail"></span>
                                </a>
                            </div>
                            <div id="payServiceList">
                                <a href="">正品保障</a>
                                <a title="假一赔三" href="" target="_blank">假一赔三</a>
                            </div>
                        </dd>
                    </dl>
                </div>
            </div>
            <!-- 右边图片(看了又看) -->
            <div class="dadd fr" id="r_mod">
                <div class="mod_change" id="r_mod_change">
                    <div class="cha_t">看了还看
                        <a href="javascript:void(0);" id="r_cha_t">
                            <span class="iconDetail"></span>换一批
                        </a>
                    </div>
                    <ul class="seeclip_list clear">
                        <li>
                            <a href=""><img src="/image/pageside/little/1.jpg" alt=""></a>
                        </li>
                        <li>
                            <a href=""><img src="/image/pageside/little/3.jpg" alt=""></a>
                        </li>

                    </ul>
                    <p class="see_more">
                        <a href="http://shop.yhd.com/m-3941.html" target="_blank"
                           onclick="addTrackPositionToCookie(1,'detail_fpage_seemore_goshop')">去店铺逛逛
                            <span class="iconDetail"></span>
                        </a>
                    </p>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- /商品内容列表区域上部 -->
<!-- 商品详细说明下部 -->
<div id="detail" class="wrap clear">
    <div id="detailLeft" class="fl">
        <h3>便民购官方旗舰店</h3>
        <ul class="seeclip_list clear">
            <li>
                <a href=""><img src="/image/pageside/little/1.jpg" alt=""></a>
            </li>
            <li>
                <a href=""><img src="/image/pageside/little/2.jpg" alt=""></a>
            </li>
            <li>
                <a href=""><img src="/image/pageside/little/3.jpg" alt=""></a>
            </li>
        </ul>
        <ul class="seeclip_list clear">
            <li>
                <a href=""><img src="/image/pageside/little/4.jpg" alt=""></a>
            </li>
            <li>
                <a href=""><img src="/image/pageside/little/5.jpg" alt=""></a>
            </li>
        </ul>
        <h3>看了又看</h3>
        <ul class="seeclip_list clear">
            <li>
                <a href=""><img src="/image/pageside/little/1.jpg" alt=""></a>
            </li>
            <li>
                <a href=""><img src="/image/pageside/little/2.jpg" alt=""></a>
            </li>
        </ul>
    </div>
    <div id="detailRight" class="fr">
        <ul class="des_tab">
            <li class="des_tabbox" id="detail_desc_tab">
                <a href="javascript:void(0)" tabindex="0" class="tab cur">商品介绍</a>
                <a href="javascript:void(0)" class="tab" id="desc_sppj" tabindex="-100">评价&nbsp;<em>3</em></a>
                <a tabindex="1" href="javascript:void(0)" class="tab">规格及包装</a>
                <a tabindex="3" href="javascript:void(0)" class="tab">售后服务</a><a href="javascript:void(0)"
                                                                                 id="desc_spwd" class="tab"
                                                                                 tabindex="-101">商品问答</a>
            </li>
            <li class="des_act">
                <div class="btnbox">
                    <a class="add_cart" style="display:none;" id="detail_desc_addCartBtn"
                       href="javascript:void(0);"><span>加入购物车</span></a>
                </div>
                <div style="display:none;" id="detail_desc_FaqBtn" class="onlinebox"><a
                        href="javascript:void(0);">商家客服</a></div>
            </li>
        </ul>
        <div class="goodStandard clear">
            <h4>规格参数</h4>
            <ul>
                <li>商品名称：洛川苹果 陕西红富士苹果...</li>
                <li title="中国大陆">商品产地：中国大陆</li>
                <li title="8.0kg"></li>
                <li></li>
                <li title="洛川苹果">特产品类：洛川苹果</li>
                <li></li>
            </ul>
            <ul>
                <li title="10040797248193">商品编号：SX1004071</li>
                <li></li>
                <li title="85-90mm">果实直径：85-90mm</li>
                <li></li>
                <li title="富士">品种：富士</li>
                <li></li>
                <li></li>
            </ul>
            <ul>
                <li title="苹安乐农旗舰店">店铺： <a href="" target="_blank">陕西便民购旗舰店</a></li>
                <li></li>
                <li title="8.0kg">商品毛重：8.0kg</li>
                <li></li>
                <li>是否为套装：否</li>
                <li></li>
            </ul>
        </div>
        <div class="des_img">
            <img src="/image/detail/css01.jpg" height="240" width="790">
            <img src="/image/detail/css02.jpg">
            <div><img src="/image/detail/css04.jpg"></div>
        </div>
    </div>
</div>
<!-- /商品详细说明下部 -->

<!-- 时代服务 -->
<div th:replace="commonFragment :: #service-2014"></div>
<!-- /时代服务 -->

<!-- 页尾链接和版权信息 -->
<div th:replace="commonFragment :: #footer"></div>
<!-- /页尾链接和版权信息 -->

<script src="/js/imgTab.js"></script>
</body>

</html>

